<?php
if($_SERVER["PHP_SELF"] != $CONFIG['phpself'])
exit();
?>
<div id="parttwo">
<div class="editpart">
<script type="text/javascript" src="../function/achievements.js"></script>
<script type="text/javascript">
function valider(){
	var objet1;
	for(i = 0; i < document.formSaisie.typeofachievement.length; i++){
		if(document.formSaisie.typeofachievement[i].checked == true)
		{
			objet1 = document.formSaisie.typeofachievement[i].value;
		}
	}
	var error = 0;
	switch (objet1)
	{
		case "kill": error = killVerification(); break;
		case "hurt": error = hurtVerification(); break;
		case "engineer": error = engiVerification(); break;
		case "heavy": error = heavyVerification(); break;
		case "sniper": error = sniperVerification(); break;
		case "medic": error = medicVerification(); break;
		case "scout": error = scoutVerification(); break;
		case "fun": error = funVerification(); break;
		case "map": error = mapVerification(); break;
		case "condition": error = conditionVerification(); break;
		case "demoman": error = demomanVerification(); break;
		case "soldier": error = soldierVerification(); break;
		case "spy": error = spyVerification(); break;
		case "none": error = noneVerification(); break;
		default : 
	}
	if (error != 0){
		switch(error)
		{
			case 1: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_NOWHO[$Lang]; ?>"); break;
			case 2: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_NONBRAMOUNT[$Lang]; ?>"); break;
			case 3: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_HURTCRITZ[$Lang]; ?>"); break;
			case 4: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_DOMINATION[$Lang]; ?>"); break;
			case 5: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_REVENGE[$Lang]; ?>"); break;
			case 6: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_HEADSHOT[$Lang]; ?>"); break;
			case 7: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_BACKSTAB[$Lang]; ?>"); break;
			case 8: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_DEADRINGER[$Lang]; ?>"); break;			
			case 21: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_NOWHO[$Lang]; ?>"); break;
			case 22: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_HURTCRITZ[$Lang]; ?>"); break;
			case 23: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_HURTDMG[$Lang]; ?>"); break;
			case 31: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_NOWHAT[$Lang]; ?>"); break;
			case 32: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_NOWHO[$Lang]; ?>"); break;
			case 41: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_NOWHAT[$Lang]; ?>"); break;
			case 42: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_NOWHO[$Lang]; ?>"); break;
			case 51: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_NOWHAT[$Lang]; ?>"); break;
			case 52: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_NOWHO[$Lang]; ?>"); break;
			case 61: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_NOWHO[$Lang]; ?>"); break;
			case 62: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_NOWHAT[$Lang]; ?>"); break;
			case 71: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_NOWHAT[$Lang]; ?>"); break;
			case 72: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_NOWHO[$Lang]; ?>"); break;
			case 81: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_NOWHAT[$Lang]; ?>"); break;
			case 82: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_FUN_SAY[$Lang]; ?>"); break;
			case 83: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_FUN_EXACT[$Lang]; ?>"); break;
			case 91: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_NOWHO[$Lang]; ?>"); break;
			case 92: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_CONDITION[$Lang]; ?>"); break;
			case 93: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_CONDITION_HEALTH1[$Lang]; ?>"); break;
			case 94: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_CONDITION_HEALTH2[$Lang]; ?>"); break;
			case 95: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_CONDITION_HAT[$Lang]; ?>"); break;
			case 96: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_CONDITION_DISTANCE1[$Lang]; ?>"); break;
			case 97: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_CONDITION_DISTANCE2[$Lang]; ?>"); break;
			case 100: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_WHAT[$Lang]; ?>"); break;
			case 111: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_SOLDIERACTION[$Lang]; ?>"); break;
			case 121: alert("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_SPY[$Lang]; ?>"); break;
			<?php if ($GET_VAR_PART != 6)
			{ ?>case 101: var answer = confirm("<?php echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_NONE[$Lang]; ?>");
			if(answer)
				error = 0;
			break;<?php } ?>
			default:
		}
		if(error != 0)
			return false;
		else
			return true;
	}
	else
	{
		return true;
	}
}
</script>
<br/><br/>
<form action="index.php?page=<?php echo $GET_VAR_PAGE; ?>" method="post" name="formSaisie" onsubmit="return valider()">
<div class="divtypeach">
<?php include 'blockdiv.php'; ?>
</div>
<br/><br/>
<?php include 'block/kill.php'; ?>
<?php include 'block/hurt.php'; ?>
<?php include 'block/condition.php'; ?>
<?php include 'block/engineer.php'; ?>
<?php include 'block/heavy.php'; ?>
<?php include 'block/sniper.php'; ?>
<?php include 'block/medic.php'; ?>
<?php include 'block/scout.php'; ?>
<?php include 'block/map.php'; ?>
<?php include 'block/fun.php'; ?>
<?php include 'block/spy.php'; ?>
<?php include 'block/soldier.php'; ?>
<?php include 'block/demoman.php'; ?>
<br/><input type="hidden" name="part" value="<?php $popo = $GET_VAR_PART + 1; 
echo $popo; ?>"/>
<input type="hidden" name="id" value="<?php echo $_SESSION['AchIdTwo'][$GET_VAR_PART]; ?>"/>
<center><input name="next" value="<?php 
if ($GET_VAR_PART != 5)
	echo $ADMIN_CREATION_ACHIEVEMENT_PARTONE_VALID_BUTTON[$Lang]; 
else
	echo $ADMIN_CREATION_ACHIEVEMENT_PARTTWO_TERMINE[$Lang]; ?>" type="submit"></center><br>
</form>
<br/><br/>
</div>
</div>